<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>  
  <title>交通费/编辑</title>
  <%@ include file="../link_script.jsp" %>
  <script type="text/javascript">
    $(function() { 
      $("form").validity(function() {
        $("#teNumber").require();
        $("#teExpenses").require();
      });
    });
  </script>
</head>
<body>
<form action="travellingExpense.do?method=editTravellingExpense_Do&pageNum=${pageNum}" method="post" target="_self"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td width="100%" class="STYLE32">编辑交通费</td>
          </tr>
          <tr>
            <td class="STYLE11"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;旅游计划 : </td>
                <td class="STYLE11">
                <select id="tpID" name="tpID" onchange="javascript:change();">
                  <option value="${travellingExpense.tpID}">${tpName}</option>
                  <option disabled="disabled">------</option>
                  <c:if test="${!empty tourismPlanList}">
                    <c:forEach items="${tourismPlanList}" var="tp">
                      <option value="${tp.tpID}">${tp.tpName}</option>
                  </c:forEach></c:if></select></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;乘车日期 : </td>
                <td class="STYLE11"><input type="text" id="teDate" name="teDate" value="${travellingExpense.teDate}" size="10" />
               &nbsp;&nbsp;<font color="red">*</font>&nbsp;&nbsp;乘车日期在结算时作为记账凭证的记账日期</td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;交通类型 : </td>
                <td class="STYLE11">
                <select id="teType" name="teType">
                  <option value="${travellingExpense.teType}">${travellingExpense.teType}</option>
                  <option disabled="disabled">------</option>
                  <option value="火车">火车</option>
                  <option value="汽车">汽车</option>
                  <option value="飞机">飞机</option>  
                  <option value="地铁">地铁</option>  
                  <option value="轮船">轮船</option>                    
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;出发站 : </td>
                <td class="STYLE11"><input type="text" id="beginPlace" name="beginPlace" value="${travellingExpense.beginPlace}" size="10" /></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;终点站 : </td>
                <td class="STYLE11"><input type="text" id="endPlace" name="endPlace" value="${travellingExpense.endPlace}" size="10" /></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;车次 : </td>
                <td class="STYLE11"><input type="text" id="trainNum" name="trainNum" value="${travellingExpense.trainNum}" size="10" />
                &nbsp;&nbsp;<font color="red">*</font>&nbsp;&nbsp;只对火车有效，其它交通类型不用填<br/></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;数量 : </td>
                <c:if test="${travellingExpense.tePay=='1'}">
                  <td class="STYLE11"><input type="text" id="teNumber" name="teNumber" value="${travellingExpense.teNumber}" size="10" title="数量不能为空" />&nbsp;张</td>
                </c:if>
                <c:if test="${travellingExpense.tePay=='0'}">
                  <td class="STYLE11"><input type="text" id="teNumber" name="teNumber" value="${travellingExpense.teNumber}" size="10" title="数量不能为空" readonly />&nbsp;张</td>
                </c:if> 
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;耗时 : </td>
                <td class="STYLE11"><input type="text" id="teTime" name="teTime" value="${travellingExpense.teTime}" size="10" />&nbsp;小时</td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;费用: </td>
                <c:if test="${travellingExpense.tePay=='1'}">
                  <td class="STYLE11"><input type="text" id="teExpenses" name="teExpenses" value="${travellingExpense.teExpenses}" size="10" title="费用不能为空" />&nbsp;￥</td>
                </c:if>
                <c:if test="${travellingExpense.tePay=='0'}">
                  <td class="STYLE11"><input type="text" id="teExpenses" name="teExpenses" value="${travellingExpense.teExpenses}" size="10" title="费用不能为空" readonly />&nbsp;￥</td>
                </c:if>               
              </tr>            
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;描述 : </td>
                <td class="STYLE11"><textarea id="teDesc" name="teDesc" cols="54" rows="4" style="font-family:宋体;font-size:12px">${travellingExpense.teDesc}</textarea></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;</td>
                <td class="STYLE11"><input type=hidden id="teID" name="teID" value="${travellingExpense.teID}" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td class="STYLE12"><input type="submit" value="提交"/><input type="reset" value="取消"/></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@include file="../no_page.jsp" %>
</table>
</form>
</body>
</html>
